<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://primefaces.org/ui">
    <f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
        <h:head>

    </h:head>
        <h:body>
            <h:form id="form">
                <p:messages id="msgs" showDetail="true">
                    <p:autoUpdate/>
                </p:messages>
                <p:selectOneMenu id="selectonemenu" var="v">
                    <f:selectItems value="#{selectOneMenu012.selectItems}"/>
                    <p:column>
                        <h:outputText id="item_id" value="#{v.id}"/>
                    </p:column>
                    <p:column>
                        <h:outputText id="item_name" value="#{v.name}"/>
                    </p:column>
                </p:selectOneMenu>
            </h:form>
<script>
    function checkDuplicateIds() {
        setTimeout(function() {
            var ids = {};
            $('[id]').each(function() {
                var id = this.id;
                if (id &amp;&amp; ids[id]) {
                    ids[id].push(this);
                    console.error('Duplicate id: ' + id + ' in elements', ids[id]);
                } else {
                    ids[id] = [this];
                }
            });
        }, 100);
    }
    checkDuplicateIds();
</script>
        </h:body>
    </f:view>
</html>